package sctu.edu.java.year2016.team03.maoyuhao.day50160611.chapter15_1;

import sctu.edu.java.year2016.team01.xuhanmei.day20160607.SleepMethodTest;

/**
 * 尝试定义一个继承Thread类的类，并覆盖run方法，在run方法中每隔100毫秒打印一句话
 * Created by cc on 2016/6/11.
 */
public class Test extends Thread {

    public void run(){
        while (true){
            System.out.println("heheda");
            try {
                sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }

    public static void main(String[] args) {
        new Test().start();
    }

}
